package test;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;
import engine.Inanimate;

/**
 * Note: currently I am just using this class to test
 * the MarioLevelFactory. It has arguments in the constructor
 * but doesn't really do anything.
 * 
 * @author Alex
 */

public class Brick extends Inanimate {

    private int myX;
    private int myY;
    
    public Brick(int x, int y) {
        super();
        myX = x;
        myY = y;
        setPosition(new Point(x,y));
        System.out.printf("The class was instantiated succesfully. x = %d. y = %d.\n", myX, myY);
    }
    
    @Override
    public void paint (Graphics g, int offsetX, int offsetY) {
        // TODO Auto-generated method stub
        g.setColor(Color.BLUE);
        g.fillRect((int)getPosition().getX()-offsetX,(int)getPosition().getY()-offsetY,50,50);
    }

    @Override
    public Rectangle getBounds () {
        // TODO Auto-generated method stub
        return new Rectangle((int)getPosition().getX(), (int)getPosition().getY(),50,50);
    }

}
